Feat: pull images before restart #920
Merged
+19
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is the same as nodeset-org/hyperdrive#220 but adjusted for the rpl smartnode cli:
Description
This PR is a small optimization that will pull the new docker container images before stopping the currently running ones, resulting in less downtime than before.
Motivation
I've been bitten by having to wait for several containers to be pulled before, which are not only causing unnecessary downtime, but can be especially painful if one gets rate-limited by dockerhub, or when there are other failure modes in the image pull scenario. (e.g. docker disk full - which is not necessarily the same as where the data volumes live)
With this change the containers won't be stopped until the new images are available, potentially preventing these issues and improving uptime.
Changes
Old situation:
New situation:
Screenshots
Before - containers are stopped, then new ones pulled, then started

After - new images pulled first, then containers stopped, then started
